{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 训练LightGBM模型\n",
    "tfidf特征 boosting_type=gbdt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "导入模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import lightgbm as lgb\n",
    "from lightgbm.sklearn import LGBMClassifier\n",
    "from sklearn.model_selection import GridSearchCV"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "准备数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>feat_1_tfidf</th>\n",
       "      <th>feat_2_tfidf</th>\n",
       "      <th>feat_3_tfidf</th>\n",
       "      <th>feat_4_tfidf</th>\n",
       "      <th>feat_5_tfidf</th>\n",
       "      <th>feat_6_tfidf</th>\n",
       "      <th>feat_7_tfidf</th>\n",
       "      <th>feat_8_tfidf</th>\n",
       "      <th>feat_9_tfidf</th>\n",
       "      <th>feat_10_tfidf</th>\n",
       "      <th>feat_11_tfidf</th>\n",
       "      <th>feat_12_tfidf</th>\n",
       "      <th>feat_13_tfidf</th>\n",
       "      <th>feat_14_tfidf</th>\n",
       "      <th>feat_15_tfidf</th>\n",
       "      <th>feat_16_tfidf</th>\n",
       "      <th>feat_17_tfidf</th>\n",
       "      <th>feat_18_tfidf</th>\n",
       "      <th>feat_19_tfidf</th>\n",
       "      <th>feat_20_tfidf</th>\n",
       "      <th>feat_21_tfidf</th>\n",
       "      <th>feat_22_tfidf</th>\n",
       "      <th>feat_23_tfidf</th>\n",
       "      <th>feat_24_tfidf</th>\n",
       "      <th>feat_25_tfidf</th>\n",
       "      <th>feat_26_tfidf</th>\n",
       "      <th>feat_27_tfidf</th>\n",
       "      <th>feat_28_tfidf</th>\n",
       "      <th>feat_29_tfidf</th>\n",
       "      <th>feat_30_tfidf</th>\n",
       "      <th>feat_31_tfidf</th>\n",
       "      <th>feat_32_tfidf</th>\n",
       "      <th>feat_33_tfidf</th>\n",
       "      <th>feat_34_tfidf</th>\n",
       "      <th>feat_35_tfidf</th>\n",
       "      <th>feat_36_tfidf</th>\n",
       "      <th>feat_37_tfidf</th>\n",
       "      <th>feat_38_tfidf</th>\n",
       "      <th>feat_39_tfidf</th>\n",
       "      <th>feat_40_tfidf</th>\n",
       "      <th>feat_41_tfidf</th>\n",
       "      <th>feat_42_tfidf</th>\n",
       "      <th>feat_43_tfidf</th>\n",
       "      <th>feat_44_tfidf</th>\n",
       "      <th>feat_45_tfidf</th>\n",
       "      <th>feat_46_tfidf</th>\n",
       "      <th>feat_47_tfidf</th>\n",
       "      <th>feat_48_tfidf</th>\n",
       "      <th>feat_49_tfidf</th>\n",
       "      <th>feat_50_tfidf</th>\n",
       "      <th>feat_51_tfidf</th>\n",
       "      <th>feat_52_tfidf</th>\n",
       "      <th>feat_53_tfidf</th>\n",
       "      <th>feat_54_tfidf</th>\n",
       "      <th>feat_55_tfidf</th>\n",
       "      <th>feat_56_tfidf</th>\n",
       "      <th>feat_57_tfidf</th>\n",
       "      <th>feat_58_tfidf</th>\n",
       "      <th>feat_59_tfidf</th>\n",
       "      <th>feat_60_tfidf</th>\n",
       "      <th>feat_61_tfidf</th>\n",
       "      <th>feat_62_tfidf</th>\n",
       "      <th>feat_63_tfidf</th>\n",
       "      <th>feat_64_tfidf</th>\n",
       "      <th>feat_65_tfidf</th>\n",
       "      <th>feat_66_tfidf</th>\n",
       "      <th>feat_67_tfidf</th>\n",
       "      <th>feat_68_tfidf</th>\n",
       "      <th>feat_69_tfidf</th>\n",
       "      <th>feat_70_tfidf</th>\n",
       "      <th>feat_71_tfidf</th>\n",
       "      <th>feat_72_tfidf</th>\n",
       "      <th>feat_73_tfidf</th>\n",
       "      <th>feat_74_tfidf</th>\n",
       "      <th>feat_75_tfidf</th>\n",
       "      <th>feat_76_tfidf</th>\n",
       "      <th>feat_77_tfidf</th>\n",
       "      <th>feat_78_tfidf</th>\n",
       "      <th>feat_79_tfidf</th>\n",
       "      <th>feat_80_tfidf</th>\n",
       "      <th>feat_81_tfidf</th>\n",
       "      <th>feat_82_tfidf</th>\n",
       "      <th>feat_83_tfidf</th>\n",
       "      <th>feat_84_tfidf</th>\n",
       "      <th>feat_85_tfidf</th>\n",
       "      <th>feat_86_tfidf</th>\n",
       "      <th>feat_87_tfidf</th>\n",
       "      <th>feat_88_tfidf</th>\n",
       "      <th>feat_89_tfidf</th>\n",
       "      <th>feat_90_tfidf</th>\n",
       "      <th>feat_91_tfidf</th>\n",
       "      <th>feat_92_tfidf</th>\n",
       "      <th>feat_93_tfidf</th>\n",
       "      <th>target</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0.081393</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.066506</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.171434</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.071123</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.167683</td>\n",
       "      <td>0.048113</td>\n",
       "      <td>0.080745</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.186325</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.075129</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.05051</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.336855</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.097052</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.056426</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.188676</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.766794</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.055352</td>\n",
       "      <td>0.103011</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.084053</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.317087</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.080464</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.193174</td>\n",
       "      <td>0.082123</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.075886</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Class_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.231403</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.560768</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.335531</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.294616</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.207923</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.153726</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.547269</td>\n",
       "      <td>0.262161</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.262647</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.330348</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Class_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.199730</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.251077</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.181539</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.142139</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.283780</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.796107</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.406298</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.362081</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Class_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>0.011987</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.011668</td>\n",
       "      <td>0.105971</td>\n",
       "      <td>0.021681</td>\n",
       "      <td>0.080435</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.013525</td>\n",
       "      <td>0.009794</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.011706</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.009457</td>\n",
       "      <td>0.012623</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.043215</td>\n",
       "      <td>0.014171</td>\n",
       "      <td>0.023782</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.907203</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.106291</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.037473</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.022422</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.026996</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.007146</td>\n",
       "      <td>0.025916</td>\n",
       "      <td>0.012760</td>\n",
       "      <td>0.061252</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.024929</td>\n",
       "      <td>0.014268</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.024757</td>\n",
       "      <td>0.011435</td>\n",
       "      <td>0.033355</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.040855</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.023749</td>\n",
       "      <td>0.011377</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.011398</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.014224</td>\n",
       "      <td>0.012094</td>\n",
       "      <td>0.036409</td>\n",
       "      <td>0.036525</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.460983</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.008244</td>\n",
       "      <td>0.022456</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Class_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.563067</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.068844</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.130841</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.284569</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.090900</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.142006</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.396422</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.634471</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.203001</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.124622</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.145988</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Class_1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   id  feat_1_tfidf  feat_2_tfidf  feat_3_tfidf   ...     feat_91_tfidf  feat_92_tfidf  feat_93_tfidf   target\n",
       "0   1      0.081393           0.0           0.0   ...               0.0            0.0            0.0  Class_1\n",
       "1   2      0.000000           0.0           0.0   ...               0.0            0.0            0.0  Class_1\n",
       "2   3      0.000000           0.0           0.0   ...               0.0            0.0            0.0  Class_1\n",
       "3   4      0.011987           0.0           0.0   ...               0.0            0.0            0.0  Class_1\n",
       "4   5      0.000000           0.0           0.0   ...               0.0            0.0            0.0  Class_1\n",
       "\n",
       "[5 rows x 95 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dpath = \"../data/\"\n",
    "train = pd.read_csv(dpath + \"Otto_FE_train_tfidf.csv\")\n",
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = train.iloc[:,1:94]\n",
    "y = train[\"target\"]\n",
    "y = y.map(lambda x:int(x[6:])-1)\n",
    "feat_names = X.columns\n",
    "from scipy.sparse import csr_matrix\n",
    "X = csr_matrix(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((61878, 93), (61878,))"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X.shape, y.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "LightGBM超参数调优"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection import StratifiedKFold\n",
    "kfold = StratifiedKFold(n_splits=3,shuffle=True,random_state=6)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1.n_estimators"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "max_rounds = 10000\n",
    "def get_n_estimators(params, X, y, early_stopping_rounds=10):\n",
    "    lgbm_train = lgb.Dataset(X,y)\n",
    "    cv_results = lgb.cv(params = params,train_set=lgbm_train,num_boost_round=max_rounds,nfold=3,\\\n",
    "                        metrics=\"multi_logloss\",early_stopping_rounds=early_stopping_rounds,seed=6)\n",
    "    print(\"best_estimators:\",len(cv_results[\"multi_logloss-mean\"]))\n",
    "    print(\"best_score:\", cv_results[\"multi_logloss-mean\"][-1])\n",
    "    return len(cv_results[\"multi_logloss-mean\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best_estimators: 426\n",
      "best_score: 0.4851443890680931\n"
     ]
    }
   ],
   "source": [
    "params = {'boosting_type': 'gbdt',\n",
    "          'objective': 'multiclass',\n",
    "          'num_class':9,\n",
    "          'n_jobs': 4,\n",
    "          'learning_rate': 0.1,\n",
    "          'num_leaves': 60,\n",
    "          'max_depth': 6,\n",
    "          'max_bin': 127, \n",
    "          'subsample': 0.7,\n",
    "          'bagging_freq': 1,\n",
    "          'colsample_bytree': 0.7,\n",
    "         }\n",
    "n_estimators = get_n_estimators(params,X,y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "2.num_leaves & max_depth"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 4 candidates, totalling 12 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.\n",
      "[Parallel(n_jobs=4)]: Done   8 out of  12 | elapsed:  5.5min remaining:  2.8min\n",
      "[Parallel(n_jobs=4)]: Done  12 out of  12 | elapsed:  8.2min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=6, shuffle=True),\n",
       "       error_score='raise-deprecating',\n",
       "       estimator=LGBMClassifier(bagging_freq=1, boosting_type='gbdt', class_weight=None,\n",
       "        colsample_bytree=0.7, importance_type='split', learning_rate=0.1,\n",
       "        max_bin=127, max_depth=7, min_child_samples=20,\n",
       "        min_child_weight=0.001, min_split_gain=0.0, n_estimators=426,\n",
       "        n_jobs=4, num_class=9, num_leaves=31, objective='multiclass',\n",
       "        random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=False,\n",
       "        subsample=0.7, subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid='warn', n_jobs=4,\n",
       "       param_grid={'num_leaves': range(50, 90, 10)},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {'boosting_type': 'gbdt',\n",
    "          'objective': 'multiclass',\n",
    "          'num_class':9, \n",
    "          'n_jobs': 4,\n",
    "          'learning_rate': 0.1,\n",
    "          'n_estimators':n_estimators,\n",
    "          'max_depth': 7,\n",
    "          'max_bin': 127, \n",
    "          'subsample': 0.7,\n",
    "          'bagging_freq': 1,\n",
    "          'colsample_bytree': 0.7,\n",
    "         }\n",
    "lgbm = LGBMClassifier(silent=False,**params)\n",
    "num_leaves = range(50,90,10)\n",
    "param_grid = dict(num_leaves=num_leaves)\n",
    "gridsearch = GridSearchCV(lgbm,n_jobs=4,param_grid=param_grid,cv=kfold,\\\n",
    "                    scoring=\"neg_log_loss\",verbose=5,refit=False)\n",
    "gridsearch.fit(X,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-0.48515210531356207\n",
      "{'num_leaves': 70}\n"
     ]
    }
   ],
   "source": [
    "print(gridsearch.best_score_)\n",
    "print(gridsearch.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZkAAAELCAYAAAALC/uGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xt4FtW58P/vnfOBEAIJCEkgBBIOioJGxCIoCAjqi7XVeqi7VrvFqnhAaovde/e33/bd1aqI1qIVW6277latlW6qchQRQVGCclJCCCGQcErCIZxyzv3745ngQ0xIAplMnjz357q4kmfNWjP3Ykhu1pqZNaKqGGOMMW4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i8jDzgrLa0SkewuPe5GIfOismL3Yb/2vu0RkrYhsEJG/O8uFxIvvhXQhTp0YESkUkXARGSAii5z9fCQig506NzovsdogIitd+cszQc2SjDEtlwHMVdVzgcPAd5upfx5wK74FFP8LOOGssPwJ8IPmDiYi4cBzwA2qehHwsrMf8L1o6mJVvQDYAvzIWfZkA3C5U+f/AIudBRHnAfc7+/kJ8LxT5xfAVc5+pjYXkzGtFdZ8FWOMY4eqrne+XwekNVP/A1U9ChwVkTLgn075JuD8FhxvEL5EtdS3piGh+JaWBzhPRP4f0A3oAix2yt/Atz7VB/jegfK8iHTBt+Lu35z9AEQ6X1cDf3LelPh2C2IyplUsyRjTcv4LB9YC0fgWG6yfEYg6Tf06v891tOxnT4AvVfXSRrb9Cfi2qm4QkR8CVzjlC4DHnOm4i4Dl+N4dclhVhzfciar+WEQuAa4B1ovIcFU90ILYjGkRmy4z5uwU4PtlDl8vmd5WtgJJInIp+KbPRORcZ1scsNeZUvt+fQNVPQZ8BjwLvOO89+QIsENEbnT2IyJygfP9AFX9VFV/AZQCqW3cBxPkLMkYc3aeAu4RkY+BxLbcsapW4UtcvxGRDcB6fNNeAP8BfAosBXIaNH0DuM35Wu/7wI+c/XyJ7y2JAE+KyCYR2QysxHdNx5g2Y0v9G2OMcY2NZIwxxrjGLvwb4xERmQuMblD8rKq+4kU8xrjBpsuMMca4xqbLjDHGuMaSjDHGGNdYkjHGGOMaSzLGGGNcY0nGGGOMa/5/abOz1eVNOCcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "test_means = gridsearch.cv_results_[\"mean_test_score\"]\n",
    "plt.plot(num_leaves,-test_means)\n",
    "plt.xlabel(\"num_leaves\")\n",
    "plt.ylabel(\"log_loss\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "3.min_child_samples"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 3 candidates, totalling 9 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.\n",
      "[Parallel(n_jobs=4)]: Done   4 out of   9 | elapsed:  2.5min remaining:  3.1min\n",
      "[Parallel(n_jobs=4)]: Done   6 out of   9 | elapsed:  4.5min remaining:  2.2min\n",
      "[Parallel(n_jobs=4)]: Done   9 out of   9 | elapsed:  5.6min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=6, shuffle=True),\n",
       "       error_score='raise-deprecating',\n",
       "       estimator=LGBMClassifier(bagging_freq=1, boosting_type='gbdt', class_weight=None,\n",
       "        colsample_bytree=0.7, importance_type='split', learning_rate=0.1,\n",
       "        max_bin=127, max_depth=7, min_child_samples=20,\n",
       "        min_child_weight=0.001, min_split_gain=0.0, n_estimators=426,\n",
       "        n_jobs=4, num_class=9, num_leaves=70, objective='multiclass',\n",
       "        random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=False,\n",
       "        subsample=0.7, subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid='warn', n_jobs=4,\n",
       "       param_grid={'min_child_samples': range(30, 60, 10)},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {'boosting_type': 'gbdt',\n",
    "          'objective': 'multiclass',\n",
    "          'num_class':9, \n",
    "          'n_jobs': 4,\n",
    "          'learning_rate': 0.1,\n",
    "          'n_estimators':n_estimators,\n",
    "          'max_depth': 7,\n",
    "          'num_leaves':70,\n",
    "          'max_bin': 127, \n",
    "          'subsample': 0.7,\n",
    "          'bagging_freq': 1,\n",
    "          'colsample_bytree': 0.7,\n",
    "         }\n",
    "lgbm = LGBMClassifier(silent=False,**params)\n",
    "min_child_samples = range(30,60,10)\n",
    "param_grid = dict(min_child_samples=min_child_samples)\n",
    "gridsearch = GridSearchCV(lgbm,n_jobs=4,param_grid=param_grid,cv=kfold,\\\n",
    "                    scoring=\"neg_log_loss\",verbose=5,refit=False)\n",
    "gridsearch.fit(X,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-0.4838347845019459\n",
      "{'min_child_samples': 40}\n"
     ]
    }
   ],
   "source": [
    "print(gridsearch.best_score_)\n",
    "print(gridsearch.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZkAAAELCAYAAAALC/uGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xd8FAX6x/HPkx4CoYUeIEhHSgih6nke6h0ioqd0UFGRop56eirqeZ56np4VC1JEEaWDeiIqdg8LLQm9h94DUkILac/vj134RUxIApnM7uZ5v177Ijs7s/Odcdxnp+wzoqoYY4wxTghyO4AxxpjAZUXGGGOMY6zIGGOMcYwVGWOMMY6xImOMMcYxVmSMMcY4xoqMMcYYx1iRMcYY4xgrMsYYYxwT4nYAt8XExGhcXJzbMYwxxq8kJycfUNVqhY1X5otMXFwcSUlJbscwxhi/IiLbijKeHS4zxhjjGCsyxhhjHGNFxhhjjGOsyBhjjHGMFRljjDGOsSJjjDHGMVZkjDHGOMaKjDHGlDFpRzN4+8ct5Oaq4/OyImOMMWVId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3EXztNOHAlcCi1T1qKruBzJEpJL3tcWqullVc7xZLj1rvlcA7YAl3nv0XIGnT9Zm4CIReV1EugEF3T/FlEFWZExZcSrP37l5nueS/7nJvOPnd4+NvK8V1ADw9HvkFDCPsxWpkaCqzgcuA3YB74vIzSLSAM9e2RWq2hpPi/mIfLLkXfbTz09nO3v+Zz8XPJ2F472Ppqr6T/XcQbENnqaQd1H8u1eaAGZFxpgL8yVwm4iUAxCRKuf5Pj8B/bx/DzzXiCJSH8/Nst4C3gYSgGjgOHBERGrguVlVcXXwnhsKwnNY7MezXv8G6CUi1b05qohIfe+VZ0Gq+gHwuDePMYBdXWbMBVHVeSISDySJSCbwGfmf4ynMvcBUEbkX+KCQcS8HHhSRLOAYcLOqbhGRpXgOBW7GU7SKawGe80+tgPl4bnZ1hqquEZG/47mtbxCQhWfP5SQwMc+FAo+cx7xNgLJW/8YYRORy4G+q2sPtLCaw2OEyY4wxjrE9GWOKQERa8durvk6pasdAmqcxJc2KjDHGGMfY4TJjjDGOsSJjjDHGMVZkjDHGOMaKjDHGGMdYkTHGGOOY/wPQXp2XRrM2qgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "test_means = gridsearch.cv_results_[\"mean_test_score\"]\n",
    "plt.plot(min_child_samples,-test_means)\n",
    "plt.xlabel(\"min_child_samples\")\n",
    "plt.ylabel(\"log_loss\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.sub_samples/bagging_fraction"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 5 candidates, totalling 15 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.\n",
      "[Parallel(n_jobs=4)]: Done  12 out of  15 | elapsed:  7.7min remaining:  1.9min\n",
      "[Parallel(n_jobs=4)]: Done  15 out of  15 | elapsed:  9.2min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=6, shuffle=True),\n",
       "       error_score='raise-deprecating',\n",
       "       estimator=LGBMClassifier(bagging_freq=1, boosting_type='gbdt', class_weight=None,\n",
       "        colsample_bytree=0.7, importance_type='split', learning_rate=0.1,\n",
       "        max_bin=127, max_depth=7, min_child_samples=40,\n",
       "        min_child_weight=0.001, min_split_gain=0.0, n_estimators=426,\n",
       "        n_jobs=4, num_class=9, num_leaves=70, objective='multiclass',\n",
       "        random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=False,\n",
       "        subsample=1.0, subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid='warn', n_jobs=4,\n",
       "       param_grid={'subsample': [0.5, 0.6, 0.7, 0.8, 0.9]},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {'boosting_type': 'gbdt',\n",
    "          'objective': 'multiclass',\n",
    "          'num_class':9, \n",
    "          'n_jobs': 4,\n",
    "          'learning_rate': 0.1,\n",
    "          'n_estimators':n_estimators,\n",
    "          'max_depth': 7,\n",
    "          'num_leaves':70,\n",
    "          'min_child_samples':40,\n",
    "          'max_bin': 127, \n",
    "          #'subsample': 0.7,\n",
    "          'bagging_freq': 1,\n",
    "          'colsample_bytree': 0.7,\n",
    "         }\n",
    "lgbm = LGBMClassifier(silent = False,**params)\n",
    "subsample = [i/10 for i in range(5,10)]\n",
    "param_grid = dict(subsample=subsample)\n",
    "gridsearch = GridSearchCV(lgbm,n_jobs=4,param_grid=param_grid,cv=kfold,\\\n",
    "                    scoring=\"neg_log_loss\",verbose=5,refit=False)\n",
    "gridsearch.fit(X,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-0.4838347845019459\n",
      "{'subsample': 0.7}\n"
     ]
    }
   ],
   "source": [
    "print(gridsearch.best_score_)\n",
    "print(gridsearch.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAELCAYAAADz6wBxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xd4VGXax/HvnUJJoSahJiSQ0DsBQQQVLIAFWUDAhmtbV1B0wb7uuuq6irLYUMSC2EBBESwLooAoChJ6h9AkgCTUkED6/f4xg2/EAAnJ5Mxk7s915WLmzHNmfuck5M45z3OeI6qKMcYYc64CnA5gjDHGt1khMcYYUypWSIwxxpSKFRJjjDGlYoXEGGNMqVghMcYYUypWSIwxxpSKxwuJiPQRkc0ikiwiD52h3SARURFJdD8PFpEpIrJWRDaKyMOF2o4SkXUisl5E7vX0NhhjjDm9IE++uYgEAhOAS4EUYJmIzFbVDae0CwfuAZYWWjwYqKyqbUQkBNggIlOBMOB2oAuQA8wRkS9Vdasnt8UYY0zRPFpIcP2yT1bV7QAiMg3oD2w4pd2TwFhgTKFlCoSKSBBQFVfRSAc6A0tU9bj7Pb8DBrjXL1JERITGxsaWxfYYY4zfWL58+QFVjTxbO08XkgbA7kLPU4DzCjcQkQ5AtKp+ISKFC8kMXEVnHxAC3Keqh0RkHfBvEakNnAD6AUmnfrCI3AHcARATE0NS0h+aGGOMOQMR2VWcdp4uJFLEst8m9xKRAGA8cHMR7bo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xxpTK/wGEuwlE9yX27gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "test_means = gridsearch.cv_results_[\"mean_test_score\"]\n",
    "plt.plot(sub_samples,-test_means)\n",
    "plt.xlabel(\"sub_samples\")\n",
    "plt.ylabel(\"log_loss\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "5.列采样参数colsample_bytree/sub_feature/feature_fraction"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 5 candidates, totalling 15 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.\n",
      "[Parallel(n_jobs=4)]: Done  12 out of  15 | elapsed:  6.9min remaining:  1.7min\n",
      "[Parallel(n_jobs=4)]: Done  15 out of  15 | elapsed:  8.6min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=6, shuffle=True),\n",
       "       error_score='raise-deprecating',\n",
       "       estimator=LGBMClassifier(bagging_freq=1, boosting_type='gbdt', class_weight=None,\n",
       "        colsample_bytree=1.0, importance_type='split', learning_rate=0.1,\n",
       "        max_bin=127, max_depth=7, min_child_samples=40,\n",
       "        min_child_weight=0.001, min_split_gain=0.0, n_estimators=426,\n",
       "        n_jobs=4, num_class=9, num_leaves=70, objective='multiclass',\n",
       "        random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=False,\n",
       "        subsample=0.7, subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid='warn', n_jobs=4,\n",
       "       param_grid={'colsample_bytree': [0.4, 0.5, 0.6, 0.7, 0.8]},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {'boosting_type': 'gbdt',\n",
    "          'objective': 'multiclass',\n",
    "          'num_class':9, \n",
    "          'n_jobs': 4,\n",
    "          'learning_rate': 0.1,\n",
    "          'n_estimators':n_estimators,\n",
    "          'max_depth': 7,\n",
    "          'num_leaves':70,\n",
    "          'min_child_samples':40,\n",
    "          'max_bin': 127, \n",
    "          'subsample': 0.7,\n",
    "          'bagging_freq': 1,\n",
    "          #'colsample_bytree': 0.7,\n",
    "         }\n",
    "lgbm = LGBMClassifier(silent = False,**params)\n",
    "colsample_bytree = [i/10 for i in range(4,9)]\n",
    "param_grid = dict(colsample_bytree=colsample_bytree)\n",
    "gridsearch = GridSearchCV(lgbm,n_jobs=4,param_grid=param_grid,cv=kfold,\\\n",
    "                    scoring=\"neg_log_loss\",verbose=5,refit=False)\n",
    "gridsearch.fit(X,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-0.4831431174688698\n",
      "{'colsample_bytree': 0.6}\n"
     ]
    }
   ],
   "source": [
    "print(gridsearch.best_score_)\n",
    "print(gridsearch.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ8AAAELCAYAAAAGFYvBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xd8VfX9x/HXOyEMIYBA2GjYe0cEcRUXYgUHIKh1C7ZVbMWqaH8d2lpX3bR1t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fJruSxB+p4FyCkTQOuN3MMuOwruOInG/qkMvelXMx44fdnCuhgivx5gNPeeFx8eZ7Ps4VE5KuBW49pHm8mf06jDzOHYkXH+ecc3Hnh92cc87FnRcf55xzcefFxznnXNx58XHOORd3Xnycc87F3f8DIF5AwfeTKiMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "test_means = gridsearch.cv_results_[\"mean_test_score\"]\n",
    "plt.plot(colsample_bytree,-test_means)\n",
    "plt.xlabel(\"colsample_bytree\")\n",
    "plt.ylabel(\"log_loss\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "6.减小学习率，调整n_estimators"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best_estimators: 3887\n",
      "best_score: 0.4747442782255158\n"
     ]
    }
   ],
   "source": [
    "#用之前学习的参数重新调整n_estimators\n",
    "params = {'boosting_type': 'gbdt',\n",
    "          'objective': 'multiclass',\n",
    "          'num_class':9, \n",
    "          'n_jobs': 4,\n",
    "          'learning_rate': 0.01,\n",
    "          #'n_estimators':n_estimators,\n",
    "          'max_depth': 7,\n",
    "          'num_leaves':70,\n",
    "          'min_child_samples':40,\n",
    "          'max_bin': 127, \n",
    "          'subsample': 0.7,\n",
    "          'bagging_freq': 1,\n",
    "          'colsample_bytree': 0.6,\n",
    "         }\n",
    "n_estimators_2 = get_n_estimators(params , X , y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LGBMClassifier(bagging_freq=1, boosting_type='gbdt', class_weight=None,\n",
       "        colsample_bytree=0.6, importance_type='split', learning_rate=0.01,\n",
       "        max_bin=127, max_depth=7, min_child_samples=40,\n",
       "        min_child_weight=0.001, min_split_gain=0.0, n_estimators=3887,\n",
       "        n_jobs=4, num_class=9, num_leaves=75, objective='multiclass',\n",
       "        random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=False,\n",
       "        subsample=0.7, subsample_for_bin=200000, subsample_freq=0)"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {'boosting_type': 'gbdt',\n",
    "          'objective': 'multiclass',\n",
    "          'num_class':9, \n",
    "          'n_jobs': 4,\n",
    "          'learning_rate': 0.01,\n",
    "          'n_estimators':n_estimators_2,\n",
    "          'max_depth': 7,\n",
    "          'num_leaves':75,\n",
    "          'min_child_samples':40,\n",
    "          'max_bin': 127, \n",
    "          'subsample': 0.7,\n",
    "          'bagging_freq': 1,\n",
    "          'colsample_bytree': 0.6,\n",
    "         }\n",
    "\n",
    "lgbm = LGBMClassifier(silent=False,  **params)\n",
    "lgbm.fit(X, y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "特征重要度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [],
   "source": [
    "feture_importance = pd.DataFrame({\"columns\":list(feat_names,),\"importance\":lgbm.feature_importances_.T})\n",
    "feature_importance = feture_importance.sort_values(by=[\"importance\"],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>columns</th>\n",
       "      <th>importance</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>66</th>\n",
       "      <td>feat_67_tfidf</td>\n",
       "      <td>59637</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>feat_25_tfidf</td>\n",
       "      <td>57283</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>feat_24_tfidf</td>\n",
       "      <td>55566</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>feat_48_tfidf</td>\n",
       "      <td>52986</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>feat_40_tfidf</td>\n",
       "      <td>48282</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>85</th>\n",
       "      <td>feat_86_tfidf</td>\n",
       "      <td>46779</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>feat_14_tfidf</td>\n",
       "      <td>44054</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>feat_62_tfidf</td>\n",
       "      <td>37021</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>feat_16_tfidf</td>\n",
       "      <td>32545</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>feat_15_tfidf</td>\n",
       "      <td>31192</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>63</th>\n",
       "      <td>feat_64_tfidf</td>\n",
       "      <td>31038</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>feat_33_tfidf</td>\n",
       "      <td>30923</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>feat_42_tfidf</td>\n",
       "      <td>29412</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87</th>\n",
       "      <td>feat_88_tfidf</td>\n",
       "      <td>28967</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>feat_34_tfidf</td>\n",
       "      <td>28599</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>feat_54_tfidf</td>\n",
       "      <td>27325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>feat_8_tfidf</td>\n",
       "      <td>25129</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>feat_72_tfidf</td>\n",
       "      <td>24934</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>feat_32_tfidf</td>\n",
       "      <td>24654</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>feat_60_tfidf</td>\n",
       "      <td>24425</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>69</th>\n",
       "      <td>feat_70_tfidf</td>\n",
       "      <td>22961</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>feat_36_tfidf</td>\n",
       "      <td>22720</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>feat_75_tfidf</td>\n",
       "      <td>21372</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>feat_9_tfidf</td>\n",
       "      <td>20787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>feat_43_tfidf</td>\n",
       "      <td>20736</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>91</th>\n",
       "      <td>feat_92_tfidf</td>\n",
       "      <td>20035</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>feat_71_tfidf</td>\n",
       "      <td>19562</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>feat_22_tfidf</td>\n",
       "      <td>18270</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>84</th>\n",
       "      <td>feat_85_tfidf</td>\n",
       "      <td>18098</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>feat_26_tfidf</td>\n",
       "      <td>17881</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>feat_30_tfidf</td>\n",
       "      <td>9071</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64</th>\n",
       "      <td>feat_65_tfidf</td>\n",
       "      <td>9045</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>feat_91_tfidf</td>\n",
       "      <td>8925</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>feat_10_tfidf</td>\n",
       "      <td>8915</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>77</th>\n",
       "      <td>feat_78_tfidf</td>\n",
       "      <td>8640</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>feat_3_tfidf</td>\n",
       "      <td>8423</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>feat_58_tfidf</td>\n",
       "      <td>8343</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>feat_27_tfidf</td>\n",
       "      <td>7624</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>feat_46_tfidf</td>\n",
       "      <td>7463</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>feat_49_tfidf</td>\n",
       "      <td>7274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>feat_21_tfidf</td>\n",
       "      <td>7095</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>feat_12_tfidf</td>\n",
       "      <td>7082</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>feat_52_tfidf</td>\n",
       "      <td>6193</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>feat_23_tfidf</td>\n",
       "      <td>5976</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>62</th>\n",
       "      <td>feat_63_tfidf</td>\n",
       "      <td>5928</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>feat_28_tfidf</td>\n",
       "      <td>5869</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>feat_45_tfidf</td>\n",
       "      <td>5832</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>feat_19_tfidf</td>\n",
       "      <td>5775</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>feat_77_tfidf</td>\n",
       "      <td>5767</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>feat_7_tfidf</td>\n",
       "      <td>5667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>feat_5_tfidf</td>\n",
       "      <td>5232</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>feat_93_tfidf</td>\n",
       "      <td>4708</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>feat_2_tfidf</td>\n",
       "      <td>4565</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>feat_81_tfidf</td>\n",
       "      <td>4400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>feat_31_tfidf</td>\n",
       "      <td>4060</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>feat_61_tfidf</td>\n",
       "      <td>3047</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>81</th>\n",
       "      <td>feat_82_tfidf</td>\n",
       "      <td>3027</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83</th>\n",
       "      <td>feat_84_tfidf</td>\n",
       "      <td>2465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>feat_6_tfidf</td>\n",
       "      <td>2346</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>feat_51_tfidf</td>\n",
       "      <td>1484</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>93 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          columns  importance\n",
       "66  feat_67_tfidf       59637\n",
       "24  feat_25_tfidf       57283\n",
       "23  feat_24_tfidf       55566\n",
       "47  feat_48_tfidf       52986\n",
       "39  feat_40_tfidf       48282\n",
       "85  feat_86_tfidf       46779\n",
       "13  feat_14_tfidf       44054\n",
       "61  feat_62_tfidf       37021\n",
       "15  feat_16_tfidf       32545\n",
       "14  feat_15_tfidf       31192\n",
       "63  feat_64_tfidf       31038\n",
       "32  feat_33_tfidf       30923\n",
       "41  feat_42_tfidf       29412\n",
       "87  feat_88_tfidf       28967\n",
       "33  feat_34_tfidf       28599\n",
       "53  feat_54_tfidf       27325\n",
       "7    feat_8_tfidf       25129\n",
       "71  feat_72_tfidf       24934\n",
       "31  feat_32_tfidf       24654\n",
       "59  feat_60_tfidf       24425\n",
       "69  feat_70_tfidf       22961\n",
       "35  feat_36_tfidf       22720\n",
       "74  feat_75_tfidf       21372\n",
       "8    feat_9_tfidf       20787\n",
       "42  feat_43_tfidf       20736\n",
       "91  feat_92_tfidf       20035\n",
       "70  feat_71_tfidf       19562\n",
       "21  feat_22_tfidf       18270\n",
       "84  feat_85_tfidf       18098\n",
       "25  feat_26_tfidf       17881\n",
       "..            ...         ...\n",
       "29  feat_30_tfidf        9071\n",
       "64  feat_65_tfidf        9045\n",
       "90  feat_91_tfidf        8925\n",
       "9   feat_10_tfidf        8915\n",
       "77  feat_78_tfidf        8640\n",
       "2    feat_3_tfidf        8423\n",
       "57  feat_58_tfidf        8343\n",
       "26  feat_27_tfidf        7624\n",
       "45  feat_46_tfidf        7463\n",
       "48  feat_49_tfidf        7274\n",
       "20  feat_21_tfidf        7095\n",
       "11  feat_12_tfidf        7082\n",
       "51  feat_52_tfidf        6193\n",
       "22  feat_23_tfidf        5976\n",
       "62  feat_63_tfidf        5928\n",
       "27  feat_28_tfidf        5869\n",
       "44  feat_45_tfidf        5832\n",
       "18  feat_19_tfidf        5775\n",
       "76  feat_77_tfidf        5767\n",
       "6    feat_7_tfidf        5667\n",
       "4    feat_5_tfidf        5232\n",
       "92  feat_93_tfidf        4708\n",
       "1    feat_2_tfidf        4565\n",
       "80  feat_81_tfidf        4400\n",
       "30  feat_31_tfidf        4060\n",
       "60  feat_61_tfidf        3047\n",
       "81  feat_82_tfidf        3027\n",
       "83  feat_84_tfidf        2465\n",
       "5    feat_6_tfidf        2346\n",
       "50  feat_51_tfidf        1484\n",
       "\n",
       "[93 rows x 2 columns]"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "feature_importance"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "保存模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pickle\n",
    "pickle.dump(lgbm,open(\"otto_lgbmgbdt_tfidf.pkl\",\"wb\"))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
